using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_ICItemBaseMap : EntityTypeConfiguration<t_ICItemBase>
    {
        public t_ICItemBaseMap()
        {
            // Primary Key
            this.HasKey(t => t.FItemID);

            // Properties
            this.Property(t => t.FItemID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FEquipmentNum)
                .HasMaxLength(80);

            this.Property(t => t.FFullName)
                .HasMaxLength(250);

            this.Property(t => t.FAlias)
                .HasMaxLength(80);

            this.Property(t => t.FApproveNo)
                .HasMaxLength(80);

            // Table & Column Mappings
            this.ToTable("t_ICItemBase");
            this.Property(t => t.FItemID).HasColumnName("FItemID");
            this.Property(t => t.FErpClsID).HasColumnName("FErpClsID");
            this.Property(t => t.FUnitID).HasColumnName("FUnitID");
            this.Property(t => t.FUnitGroupID).HasColumnName("FUnitGroupID");
            this.Property(t => t.FDefaultLoc).HasColumnName("FDefaultLoc");
            this.Property(t => t.FSPID).HasColumnName("FSPID");
            this.Property(t => t.FSource).HasColumnName("FSource");
            this.Property(t => t.FQtyDecimal).HasColumnName("FQtyDecimal");
            this.Property(t => t.FLowLimit).HasColumnName("FLowLimit");
            this.Property(t => t.FHighLimit).HasColumnName("FHighLimit");
            this.Property(t => t.FSecInv).HasColumnName("FSecInv");
            this.Property(t => t.FUseState).HasColumnName("FUseState");
            this.Property(t => t.FIsEquipment).HasColumnName("FIsEquipment");
            this.Property(t => t.FEquipmentNum).HasColumnName("FEquipmentNum");
            this.Property(t => t.FIsSparePart).HasColumnName("FIsSparePart");
            this.Property(t => t.FFullName).HasColumnName("FFullName");
            this.Property(t => t.FSecUnitID).HasColumnName("FSecUnitID");
            this.Property(t => t.FSecCoefficient).HasColumnName("FSecCoefficient");
            this.Property(t => t.FSecUnitDecimal).HasColumnName("FSecUnitDecimal");
            this.Property(t => t.FAlias).HasColumnName("FAlias");
            this.Property(t => t.FOrderUnitID).HasColumnName("FOrderUnitID");
            this.Property(t => t.FSaleUnitID).HasColumnName("FSaleUnitID");
            this.Property(t => t.FStoreUnitID).HasColumnName("FStoreUnitID");
            this.Property(t => t.FProductUnitID).HasColumnName("FProductUnitID");
            this.Property(t => t.FApproveNo).HasColumnName("FApproveNo");
            this.Property(t => t.FAuxClassID).HasColumnName("FAuxClassID");
            this.Property(t => t.FTypeID).HasColumnName("FTypeID");
            this.Property(t => t.FPreDeadLine).HasColumnName("FPreDeadLine");
            this.Property(t => t.FSerialClassID).HasColumnName("FSerialClassID");
        }
    }
}
